1. Field of the Invention
The present invention is directed to technology for accessing information about an object, where such information is available at the time of creation of the object but not necessarily available at all times later.
2. Description of the Related Art
As the Internet's popularity grows, more businesses are establishing a presence on the Internet. These businesses typically set up web sites that run one or more web applications. One disadvantage of doing business on the Internet is that if the web site goes down, becomes unresponsive or otherwise is not properly serving customers, the business is losing potential sales and/or customers. Similar issues exist with Intranets and Extranets. Thus, there is a need to monitor live web applications and web sites to make sure that they are running properly.
One particular scenario that web application developers seek to avoid is a task that runs too slowly or is otherwise not performing as expected. For example, it may be anticipated that a task will take a fraction of one second to complete its functions; however, due to something going wrong, the task executes for thirty seconds. A task running too slowly (or doing something else unexpected) can degrade performance of a web site, degrade performance of a web application, and cause an application to fail, or cause a web site to fail. Thus, there is a need to avoid poorly performing tasks.
When an application is performing poorly, the developer or administrator usually attempts to debug the software to figure out which code is causing the performance issues so that code can be fixed. While it is usually easy to detect when an application is performing poorly because the response time is noticeably slower, it is often very difficult to determine which portion of the software is responsible for the poor performance.
Application performance analysis tools are popular tools used to debug software and to analyze an application's run time execution. Many application performance analysis tools provide timing data on how long each method (or procedure or other process) is being executed, report how many times each method is executed and/or identify the function call architecture. Other functions can also be performed by various performance analysis tools. Some of the tools provide their results in text files or on a monitor. Other tools graphically display their results.
There are some instances where it desired to analyze performance of a task; however, all of the information needed to analyze the task is not available at the time that the task is performed. In some cases, the necessary information is available at the time an object or other software entity associated with the task is created, but may not be available at the time that object or other software entity is used.
Consider the example of a Java application establishing a connection to a relational database. The java.sql.Connection interface can be used to create a connection object representing the particular database session. The “prepareStatement” method of the connection object can be used to create a prepared statement object, which contains an SQL statement that has already been compiled. The “executeQuery” method of the prepared statement object can be used to cause the relational database that is the subject of the connection object to execute the SQL statement of the prepared statement object. Performance analysis tools can monitor a particular method. Thus, a performance analysis tool could monitor the “executeQuery” method of the prepared statement object in order to determine the execution time of the SQL statement of the prepared statement object. However, the “executeQuery” method takes no parameters. Therefore, the performance analysis tool is not able to access the actual SQL statement at the time it is monitoring the performance of the “executeQuery” method. Since the performance analysis tool cannot access the actual SQL statement, the timing data can be reported but not correlated to the SQL statement that was being monitored. Not knowing the actual SQL statement reduces the debugging and analysis value of the timing data.
While the performance analysis tool is not able to access the actual SQL statement at the time it is monitoring the performance of the SQL statement, it is able to access the SQL statement at the time that the prepared statement object was created. Thus, a system is needed to gain access to information about an object, where such information is available at the time of creation of the object but not necessarily available at all times later. This problem is relevant to many other situations in addition to the relational database connection example described above.